using System;
using System.Collections.Generic;
using System.Linq;
using System.Globalization;
using Locator.LcboServices.PageLoaders.Properties;
using System.Net;

namespace Locator.LcboServices.PageLoaders.PageRetrievers
{
    public class TestStoreListPageRetriever : PageRetriever
    {
        protected override Uri BuildUrl(string parameter)
        {
            return new Uri(String.Format(CultureInfo.InvariantCulture, "http://localhost.:{0}/AllStores.aspx", Resources.TestWebPort));
        }

        protected override string PostParameters
        {
            get { return "language=EN&searchType=proximity&numstores=999&streetNumber=&streetName=&streetType=&streetDirection=&municipality_proximity=&postalCode=M5G+2C2&municipality_citywide=&Find+Stores.x=65&Find+Stores.y=15"; }
        }

        protected override string RequestMethod
        {
            get { return WebRequestMethods.Http.Post; }
        }

        public CookieCollection Cookies
        {
            get
            {
                CookieCollection cookies = new CookieCollection();
                Cookie newCookie = new Cookie() { Name="language", Value = "English", Domain = "localhost." };
                cookies.Add(newCookie);
                return cookies;
            }
        }

        protected override HttpWebRequest BuildRequestAsync(string paramter)
        {
            throw new NotImplementedException();
        }

        protected override HttpWebRequest BuildRequest(string paramter)
        {
            throw new NotImplementedException();
        }
    }
}
